<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="/themes/admin/lib/layui/css/layui.css">
</head>
<body style="background: #f1f1f1">
<div style="margin: 20px;padding:10px;background: #ffffff">
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">网站标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" required value="{$siteInfo.title}"  lay-verify="required"  autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-block">
            <input type="text" name="subtitle" required value="{$siteInfo.subtitle}" lay-verify="required"  autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">网站关键字</label>
        <div class="layui-input-block">
            <textarea name="keyword"  class="layui-textarea">{$siteInfo.keyword}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">网站描述</label>
        <div class="layui-input-block">
            <textarea name="description"  class="layui-textarea">{$siteInfo.description}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">底部版权</label>
        <div class="layui-input-block">
            <input type="text" name="copyright" required value="{$siteInfo.copyright}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" id="btn-submit" >立即提交</button>
        </div>
    </div>
</form>
</div>
<script src="/themes/admin/lib/layui/layui.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script>
    layui.use('form');
    layui.use('layer');
    $("#btn-submit").click(function(event){
        event.preventDefault();
        $.ajax({
            type:"post",
            data:$("form").serialize(),
            url:"/admin/system/site",
            success:function(e){
                if(e.code == 1){
                    layer.msg(e.msg,{icon:1});
                }else{
                    layer.msg(e.msg,{icon:2});
                }
            }
        });

    });
</script>
</body>
</html>